<!-- 不含封面的文章展示 -->
<template>
  <div id="article-item-v2">
    <div class="header">
      <div class="title">
        <a :href="'/article/' + props.articleInfo._id" target="_blank">
          {{ props.articleInfo.title }}</a
        >
      </div>
      <div class="time" v-format-time="'YYYY-MM-DD'">
        {{ props.articleInfo.time }}
      </div>
    </div>
    <div class="des">
      {{ props.articleInfo.des }}
    </div>
  </div>
</template>

<script lang="ts" setup>
import { defineProps } from 'vue'
import type { ArticleListDataTypes } from '@/server/client/api_article'

interface Props {
  articleInfo: ArticleListDataTypes
}

const props = defineProps<Props>()
</script>

<style scoped lang="less">
#article-item-v2 {
  margin-top: 50px;
  border-bottom: 1px solid #f1ecec;
  padding-bottom: 30px;
  .header {
    display: flex;
    justify-content: space-between;
    .title {
      font-size: 16px;
      color: #333;
      white-space: nowrap;
      flex: 1;
      text-overflow: ellipsis;
      overflow: hidden;
      a {
        color: #333;
        &:hover {
          color: #f13a3a;
        }
      }
    }
    .time {
      color: #999999;
      font-size: 14px;
      margin-left: 50px;
    }
  }
  .des {
    margin-top: 24px;
    font-size: 14px;
    color: #878787;
    white-space: nowrap;
    width: 1000px;
    text-overflow: ellipsis;
    overflow: hidden;
  }
}
</style>
